<?php
include("../connection.php");
?>

<form name="form1" method="post" action="eventtype.php?action=save">
<table width="322" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td width="132">title</td>
    <td width="184"><label>
      <input type="text" name="title">
    </label></td>
  </tr>
  <tr>
    <td>describution</td>
    <td><label>
      <textarea name="des" rows="10" cols="30"></textarea>
    </label></td>
  </tr>
  <tr>
    <td colspan="2"><label>
      <div align="center">
        <input type="submit" name="Submit" value="submit">
        </div>
    </label></td>
    </tr>
</table>

</form>
<?php
if($_GET["action"]=="save")
{
$title=$_POST["title"];
$des=$_POST["des"];
mysql_query("INSERT INTO eventtype(title,des)VALUES('$title','$des')")or
die(mysql_error());
echo"your event type is add";
}

?>
